#ifndef __MYPWM_H
#define __MYPWM_H

#include <stdint.h>

typedef struct
{
  uint32_t frequency; // PWM 频率(s)
  uint64_t width;     // PWM 脉宽(ns)
  uint8_t division;   // PWM 模块时钟分频系数
} pwm_property_t;

void M0PWM0_Init(uint32_t PWM_CLKDIV, uint16_t period);
void M0PWM1_Init(uint32_t PWM_CLKDIV, uint16_t period);
void M0PWM2_Init(uint32_t PWM_CLKDIV, uint16_t period, uint16_t width);
void M1PWM4_Init(uint32_t PWM_CLKDIV, uint16_t period, uint16_t width);
int8_t M1PWM6_Init(pwm_property_t *prop);
#endif
